import request from '@/utils/axios'



// 获取环境列表
export function AdminEnvironmentList(params) {
  return request.post('/sysEnvironment/pageListEnvironments', params)
}
export function AdminEnvironmentAdd(params) {
  return request.post('/sysEnvironment/addEnvironment', params)
}
export function AdminEnvironmentEdit(params) {
  return request.post('/sysEnvironment/updateEnvironment', params)

}
export function AdminEnvironmentDelete(params) {
  return request.post('/sysEnvironment/deleteEnvironment', params)
}
// 菜单列表
let list = [
  {
    "menuId": "56a6f646d29f445bb2f13aee99bec4fe",
    "menuName": "用户管理",
    "menuKey": "user",
    "menuUrl": "123",
    "menuParentId": "5c00031895bc451e89b8d98ee522cb39",
    "menuParentName": "系统管理",
    "menuIconUrl": "",
    "showType": "0",
    "path": "",
    "sn": "0",  
    "sort":"1",
    "isDefault":"0",
    "createTime": "2025-06-30T07:41:13.000+00:00",
    "updateTime": null
  },

]
export function AdminMenuList(params) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({
        total: 1,
        list: list
      })
    }, 2000)
  })
}

export function AdminMenuAdd(params) {
  return request.post('/sysPackage/addPackage', params)
}
export function AdminMenuEdit(params) {
  return request.post('/sysPackage/updatePackage', params)

}
export function AdminMenuDelete(params) {
  return request.get('/sysPackage/deletePackage', { params })
}

// 系统配置
export function AdminCompanyInfo(params) {
  return request.get('/sysProperties/getCompanyInfo')
}
export function AdminCompanyEdit(params) {
  return request.post('/sysProperties/updateCompanyInfo',params)
}






// 测试用
export function getSysConfig() {
    return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({
        info: {
          companyName: '云原生技术验证系统111',
          companyLogoUrl: 'https://static.suzi.com.cn/files/496b2ecc0f4740fc9b5fbb75e482e0ad.png'
        }
      })
    }, 2000)
  })
}
